/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.dingtalk.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 钉钉OA通知Entity
 * @author jyangye
 * @version 2018-11-14
 */
public class DingOaNotify extends DataEntity<DingOaNotify> {
	
	private static final long serialVersionUID = 1L;
	private String compId;		// 组织机构ID
	private String empId;		// 员工ID
	private User user;		// 用户ID
	private String dingUserId;		// 钉钉用户ID
	private String taskId;		// 备忘编号
	private String handlerId;		// 句柄ID
	private String title;		// 标题
	private String url;		// 查看Url
	private String content;		// 通知内容
	private Integer notifyHour1;		// 提醒小时1
	private Integer notifyMin1;		// 提醒分钟1
	private Integer notifyHour2;		// 提醒小时1
	private Integer notifyMin2;		// 提醒分钟1
	private Date lastNotifyTime;		// 上一条提醒时间
	private Date firstNotifyTime;		// 第一条提醒时间
	private String status;		// 备忘状态
	
	public DingOaNotify() {
		super();
	}

	public DingOaNotify(String id){
		super(id);
	}

	@Length(min=1, max=32, message="组织机构ID长度必须介于 1 和 32 之间")
	@ExcelField(title="组织机构ID", align=2, sort=20)
	public String getCompId() {
		return compId;
	}

	public void setCompId(String compId) {
		this.compId = compId;
	}
	
	@Length(min=1, max=32, message="员工ID长度必须介于 1 和 32 之间")
	@ExcelField(title="员工ID", align=2, sort=30)
	public String getEmpId() {
		return empId;
	}

	public void setEmpId(String empId) {
		this.empId = empId;
	}
	
	@NotNull(message="用户ID不能为空")
	@ExcelField(title="用户ID", align=2, sort=40)
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=64, message="钉钉用户ID长度必须介于 0 和 64 之间")
	@ExcelField(title="钉钉用户ID", align=2, sort=50)
	public String getDingUserId() {
		return dingUserId;
	}

	public void setDingUserId(String dingUserId) {
		this.dingUserId = dingUserId;
	}
	
	@Length(min=0, max=64, message="备忘编号长度必须介于 0 和 64 之间")
	@ExcelField(title="备忘编号", align=2, sort=60)
	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
	
	@Length(min=0, max=32, message="句柄ID长度必须介于 0 和 32 之间")
	@ExcelField(title="句柄ID", align=2, sort=70)
	public String getHandlerId() {
		return handlerId;
	}

	public void setHandlerId(String handlerId) {
		this.handlerId = handlerId;
	}
	
	@Length(min=1, max=64, message="标题长度必须介于 1 和 64 之间")
	@ExcelField(title="标题", align=2, sort=80)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=1, max=128, message="查看Url长度必须介于 1 和 128 之间")
	@ExcelField(title="查看Url", align=2, sort=90)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	@Length(min=1, max=256, message="通知内容长度必须介于 1 和 256 之间")
	@ExcelField(title="通知内容", align=2, sort=100)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getNotifyHour1() {
		return notifyHour1;
	}

	public void setNotifyHour1(Integer notifyHour1) {
		this.notifyHour1 = notifyHour1;
	}

	public Integer getNotifyMin1() {
		return notifyMin1;
	}

	public void setNotifyMin1(Integer notifyMin1) {
		this.notifyMin1 = notifyMin1;
	}

	public Integer getNotifyHour2() {
		return notifyHour2;
	}

	public void setNotifyHour2(Integer notifyHour2) {
		this.notifyHour2 = notifyHour2;
	}

	public Integer getNotifyMin2() {
		return notifyMin2;
	}

	public void setNotifyMin2(Integer notifyMin2) {
		this.notifyMin2 = notifyMin2;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="上一条提醒时间", align=2, sort=150)
	public Date getLastNotifyTime() {
		return lastNotifyTime;
	}

	public void setLastNotifyTime(Date lastNotifyTime) {
		this.lastNotifyTime = lastNotifyTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="第一条提醒时间", align=2, sort=160)
	public Date getFirstNotifyTime() {
		return firstNotifyTime;
	}

	public void setFirstNotifyTime(Date firstNotifyTime) {
		this.firstNotifyTime = firstNotifyTime;
	}
	
	@Length(min=0, max=8, message="备忘状态长度必须介于 0 和 8 之间")
	@ExcelField(title="备忘状态", align=2, sort=170)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
}